class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.string :name
      t.integer :content_type_id      
      t.timestamps
    end
    
    Category.create :name => "Article Cat#1", :content_type_id => 1
    Category.create :name => "Article Cat#2", :content_type_id => 1
    Category.create :name => "Article Cat#3", :content_type_id => 1
    Category.create :name => "Blog Cat#1", :content_type_id => 2
    Category.create :name => "Blog Cat#2", :content_type_id => 2
    Category.create :name => "User Comment Cat#1", :content_type_id => 3
    Category.create :name => "User Comment Cat#2", :content_type_id => 3
  end

  def self.down
    drop_table :categories
  end
end
